#include<iostream>
using namespace std;

class BaseClass
{
public:
	void run()
	{
		func1();
		func2();
		func3();
	}
	//稳定步骤
	void func1()
	{
		cout << "起拳" << endl;
	}
	//稳定步骤
	void func3()
	{
		cout << "收拳" << endl;
	}
	//不稳定步骤
	virtual void func2() = 0;
};
class SubClass_r :public BaseClass
{
public:
	void func2()
	{
		cout << "打右边." << endl;
	}
};
class SubClass_l :public BaseClass
{
	void func2()
	{
		cout << "打左边." << endl;
	}
};

int main()
{
	BaseClass* base;
	base = new SubClass_l();
	base->run();
	base = new SubClass_r();
	base->run();
}